{% extends 'base.html' %}
{% block content %}
    <div class="container ">
        <div class="jumbotron" id="head">
            <h1 id="index">客户端性能</h1>
        </div>
        <div class="jumbotron" id="devicetable">
            <div class="row" id="manage">
                <button class='btn btn-primary' id="get_together" onclick="together();">多版本聚合</button>
                <div>
                    <br>
                </div>
            </div>
            <table class="table table-hover">
                <tbody id="_tbody_" class="_tbody">
                {% for data in performance_datas_list %}
                    <tr id="devicedetail_{{ data.id }}">
                        <td>
                            <label>
                                <input type="checkbox" name="project_record" id="selected" value="{{ data.id }}">
                            </label>
                        </td>
                        <td>{{ data.id }}</td>
                        <td id="project_text" onclick="get_detail()">{{ task_name }}</td>
                        <td>{{ data.create_time }}</td>
                        <td>
                        <td>
                            <div class="btn-group">
                        <span class="glyphicon glyphicon-option-vertical dropdown-toggle " data-toggle="dropdown"
                              aria-haspopup="true" aria-expanded="false"></span>
                                <ul class="dropdown-menu">
                                    <li class="item table-hover" id="delete"><a class="glyphicon glyphicon-trash"
                                                                                onclick="ondelete()">&nbsp;删除</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
                <thead>
                <th>
                    <label>
                        <input type="checkbox" id="checkAll" name="checkAll" onclick="checkall(this)">
                    </label>
                    全选
                </th>
                <th>id</th>
                <th>项目名字</th>
                <th>创建时间</th>
                <th>操作</th>
                </thead>
            </table>
            {% if data %}
                <ul id="pages" class="col-lg-offset-8 pagination pagination-sm pagination-xs">
                    {% if data.first %}
                        <li><a href="?page=1">1</a></li>
                    {% endif %}
                    {% if data.left %}
                        {% if data.left_has_more %}
                            <li><span>...</span></li>
                        {% endif %}
                        {% for i in data.left %}
                            <li><a href="?page={{ i }}">{{ i }}</a></li>
                        {% endfor %}
                    {% endif %}
                    <li class="active"><a href="?page={{ data.p }}">{{ data.p }}</a></li>
                    {% if data.right %}
                        {% for i in data.right %}
                            <li><a href="?page={{ i }}">{{ i }}</a></li>
                        {% endfor %}
                        {% if data.right_has_more %}
                            <li><span>...</span></li>
                        {% endif %}
                    {% endif %}
                    {% if data.last %}
                        <li><a href="?page={{ data.total_pages }}">{{ data.total_pages }}</a></li>
                    {% endif %}
                </ul>
            {% endif %}
        </div>
    </div>
{% endblock content %}